#ifndef ACCOUNT_ACCOUNTFRIENDS_H
#define ACCOUNT_ACCOUNTFRIENDS_H

#include <QObject>
#include <QMap>
#include <QList>
namespace Account {
class Friend;
class Friends : public QObject
{
    Q_OBJECT
public:
    explicit Friends(QObject *parent = 0);
public:
    typedef QList<Friend *> List;

    inline const List &list() const {
        return m_list;
    }
public:
    Friend *append(int userid,
                   QString userName,
                   QString displayName,
                   QString avatar);
    int remove(int userId);
    const Friend *find(int userId) const;
    inline int count() const {
        return m_list.count();
    }

private:
    List m_list;

    typedef QMap<int, Friend *> Map;
    Map m_map;
};

}
#endif // ACCOUNTFRIENDS_H
